#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
bool isTraingle(vector<int>& vecArr){
	
	return (vecArr[0]+vecArr[1]>vecArr[2]) && (vecArr[0]+vecArr[2]>vecArr[1]) && (vecArr[2]+vecArr[1]>vecArr[0]);
}
bool check(vector<int>& vecArr){
	
	for(int i=0;i<6;++i){
		for(int j=0;j<6;++j){
			if(j==i){
				continue;
			}
			for(int k=0;k<6;++k){
				if(k==j || k==i){
					continue;
				}
				vector<int> vecTmp1({vecArr[i],vecArr[j],vecArr[k]});
				vector<int> vecTmp2;
				for(int z=0;z<6;++z){
					if(z==i || z==j || z==k){
						continue;
					}
					vecTmp2.push_back(vecArr[z]);
				}
				if(isTraingle(vecTmp1) && isTraingle(vecTmp2)){
					return true;
				}
			}
		}
	}
	return false;
}
int main() {

	int nt;
	cin>>nt;
	vector<int> vecArr(6);
	while(nt--){
		for(int i=0;i<6;++i){	
			cin>>vecArr[i];
		}
		if(check(vecArr)){
			cout<<"Yes"<<endl;
		}
		else{
			cout<<"No"<<endl;
		}
	}	
	
	return 0;
}
